package com.foreknow.dao;

import com.foreknow.model.Admin;
import com.foreknow.model.Guestbook;
import com.foreknow.util.Pagination;

import java.sql.SQLException;
import java.util.List;

/**
 * 接口
 * 在接口中药声明对Guestbook Bean 的操作
 */
public interface GuestbookDao {
    /**
     * 添加留言信息
     * @param guestbook
     * @return
     * @throws SQLException
     */
    public  boolean addMessage(Guestbook guestbook) throws SQLException;

    /**
     * 查询所有人信息
     * @return
     * @throws SQLException
     */
    public List<Object> getQueryAll()throws SQLException;

    /**
     * 删除根据id
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean deleteByid (Integer id)throws SQLException;

    /**
     * 根据id修改
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean updateByid(Guestbook guestbook) throws  SQLException;

    /**
     * 根据id查询所有
     * @param id
     * @return
     * @throws SQLException
     */
    public Guestbook findAllByid(Integer id)throws SQLException;

    /**
     * 分页查询留言信息
     * @param pageSize 每页显示的记录数
     * @param pageNumber    当前页码
     * @return
     * @throws SQLException
     */
    public Pagination getGuestbookByPage(int pageSize,int pageNumber)throws SQLException;
}



























